<div class="row conteinerMinSize">
	<form method="POST" action="<?php echo Config::get('URI'); ?>result/">
		
        <div class="col-xs-4 bg-success pull-left boxShadow">
            <h2 class="text-center">Какво харесвам!</h2>
            <div class="col-xs-10" id="include">
				
            <?php foreach($db_Products as $product): ?>
                <label>
                    <input type="checkbox" name="include_<?php echo $product->id; ?>" id="<?php echo $product->id; ?>"> <?php echo $product->name; ?>
                </label>
				<br />
            <?php endforeach; ?>
				
				<br />
			</div>
        </div>
        
        <div class="col-xs-4 bg-danger pull-right boxShadow">
            <h2 class="text-center">Какво не харесвам!</h2>
            <div class="col-xs-10" id="exclude">
				
            <?php foreach($db_Products as $product): ?>
                <label>
                    <input type="checkbox" name="exclude_<?php echo $product->id; ?>" id="<?php echo $product->id; ?>"> <?php echo $product->name; ?>
				</label>
				<br />
            <?php endforeach; ?>
				
				<br />
			</div>
        </div>
		
		<div class="col-xs-2 col-xs-offset-1 submitButton">
        	<button type="submit" class="btn btn-info col-xs-12 boxShadow">GO!</button>
			
			<?php if(isset($_SESSION['isLogged'])): ?>
			<div class="col-xs-12 buttonWide">
				<p></p>
				<p><a href="<?php echo Config::get('URI'); ?>logout/" class="btn btn-danger boxShadow" role="button">излез</a></p>
				<p><a href="<?php echo Config::get('URI'); ?>add-recipe/" class="btn btn-success boxShadow" role="button">добави</a></p>
			</div>
			<?php endif; ?>
			
		</div>
		
    </form>
</div>
<!-- refreshes page if user presses the back button on the browser -->
<input type="hidden" id="refreshed" value="no">
<script type="text/javascript">
	onload=function(){
		var e=document.getElementById("refreshed");
		if(e.value=="no")e.value="yes";
		else{e.value="no";location.reload();}
	}
</script>